package com.itheima.myfile.test1;

import java.io.*;

public class Demo2 {
    public static void main(String[] args) throws IOException {
        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("day12_file&IOstream\\a.txt"));
        bos.write("hfdhf".getBytes());
        bos.close();

        BufferedInputStream bis = new BufferedInputStream(new FileInputStream("day12_file&IOstream\\a.txt"));
        byte[] bytes = new byte[1024];
        int b;
        while((b=bis.read(bytes))!=-1){
            System.out.println(new String(bytes,0,b));
        }
    }
}
